<?php

/**
 * BaseCostos
 * 
 * This class is member of the DAO layer.
 * 
 * @property integer $id
 * @property integer $idArticulo
 * @property integer $IdProveedor
 * @property integer $estado
 * @property string $fInsert
 * @property Doctrine_Collection $Costositem
 * @property Doctrine_Collection $Cuentas
 * 
 * @author     Claudio Corlatti <corlatti@gmail.com>
 *  $Id: Builder.php 8 2010-05-19 23:09:37Z corlatti@gmail.com $
 */
abstract class BaseCostos extends Doctrine_Record {
    public function setTableDefinition()
    {
        $this->setTableName('costos');
        $this->hasColumn('id', 'integer', 4, array('type' => 'integer', 'length' => 4, 'primary' => true, 'autoincrement' => true));
        $this->hasColumn('idArticulo', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('IdProveedor', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
        $this->hasColumn('estado', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));
		$this->hasColumn('idCaja', 'integer', 4, array('type' => 'integer', 'length' => 4, 'notnull' => true));        
        $this->hasColumn('fInsert', 'string', 100, array('type' => 'string', 'length' => 100, 'notnull' => true));
    }

    public function setUp()
    {
        $this->hasMany('Costositem', array('local' => 'id',
                                           'foreign' => 'idCosto'));

        $this->hasMany('Cuentas', array('local' => 'id',
                                        'foreign' => 'idCosto'));
    }
}
?>